package com.ship.dispatch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.dispatch.bean.SpShipSchedule;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SpShipScheduleMapper  extends BaseMapper<SpShipSchedule> {
    /**
     * 查询船舶班期表
     */
    @Select("select imo,ship_name,redelivery_date_begin,redelivery_date_end from sp_ship_schedule \n" +
            "where plan_id = #{planId} and create_by= #{createBy} \n" +
            "GROUP BY imo,ship_name,redelivery_date_begin,redelivery_date_end")
    List<SpShipSchedule> selectShipNameAndIMO(@Param("planId") Long planId, @Param("createBy") String createBy);
}
